//
//  QKMeController.m
//  Gigle
//
//  Created by 丁乾坤 on 16/9/9.
//  Copyright © 2016年 丁乾坤. All rights reserved.
//

#import "QKMeController.h"
#import "QKMeCell.h"
@interface QKMeController ()

@end

@implementation QKMeController

- (void)viewDidLoad {
    [super viewDidLoad];
    UIView *redView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.qk_width, 200)];
    self.tableView.tableFooterView = redView;
}

#pragma mark ------ tableviewDelegate

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 2;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 1;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    //标记cell
    static NSString *cellId = @"mecell";
    //从缓存池中取出标记的cell;
    QKMeCell *meCell = [tableView dequeueReusableCellWithIdentifier:cellId];
    if (!meCell) {
        meCell = [[QKMeCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId];
    }
    if (indexPath.section == 0) {
        meCell.textLabel.text = @"登录/注册?";
        meCell.imageView.image = [UIImage imageNamed:@"setup-head-default"];
    }else{
       meCell.textLabel.text = @"离线下载";
    }
    return meCell;
}

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
    return 0.f;
}

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
    return QKMargin;
}


@end
